﻿using System;
using System.Windows.Forms;
using RentalOfCars.Client.Presentation;
using RentalOfCars.Domain.Entities;

namespace RentalOfCars.Client.WinformsClient
{
    public partial class LoginWindow : Form, ILoginWindowView
    {
        public LoginWindow()
        {
            InitializeComponent();
        }

        #region ILoginWindowView Members

        public string Login
        {
            get { return _tbxLogin.Text; }
        }

        public string Password
        {
            get { return _tbxPassword.Text; }
        }

        public bool IsLoginButtonPressed { get; set; }

        public void CloseWindow()
        {
            Close();
        }

        public Action OnLogin { private get; set; }

        public IEmployee Employee { get; set; }

        #endregion

        private void _btnLogin_Click(object sender, EventArgs e)
        {
            OnLogin();
        }
    }
}